package ru.paswd.demo.android.view.hilt.modules

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import ru.paswd.demo.android.view.components.DiscriminantSqEquResolver
import ru.paswd.demo.android.view.components.EmbeddedHistoryStorage
import ru.paswd.demo.android.view.components.HistoryStorage
import ru.paswd.demo.android.view.components.SqEquResolver
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
class DefaultModules {

    @Provides
    @Singleton
    fun createSqEquResolver(): SqEquResolver =
        DiscriminantSqEquResolver()

    @Provides
    @Singleton
    fun createHistoryStorage(): HistoryStorage =
        EmbeddedHistoryStorage()
}